package io.xxx.xbutler.domain;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
public class SystemOperation {

    @TableId
    private Long id;

    private Long userId;

    private String userName;

    /**
     * 操作的接口路径
     */
    private String actionType;

    private String actionName;

    @TableField(typeHandler = Fastjson2TypeHandler.class)
    private JSONObject requestParams;

    @TableField(typeHandler = Fastjson2TypeHandler.class)
    private JSONObject requestBody;

    private LocalDateTime createdTime;
}
